/*
 * lab9C2.c
 * CSIS 248 Operating System Programming
 */
#include <stdio.h>
#include <stdlib.h>

#define SIZE 10
int main(){
	double a[SIZE] = { 3.4, 2.5, 7.9, 94.3, -40.2,
			           -5,  0.4, 8.4, 45.2, 1.2};
	printf(" Size of the array a is %ld\n", sizeof(a) );
	printf("  Contents: ");
	int i=0;
	for (i=0; i<SIZE; i++)
		printf( " %f", a[i] );
	printf("\n\n");

	double* b;
	b = (double*) malloc( sizeof(a) );
	printf(" Size of the array b is %ld\n", sizeof(b) );

	for (i=0; i<SIZE; i++)
		b[i] = a[i];

	printf("  Contents: ");
	for (i=0; i<SIZE; i++)
		printf( " %f", b[i] );
	printf("\n");
}
